import request from '@/utils/request'

// 查询用户详情-消费记录-新增列表
export function listRecords(query) {
  return request({
    url: '/boss/records/list',
    method: 'get',
    params: query
  })
}

// 查询用户详情-消费记录-新增详细
export function getRecords(consumptionId) {
  return request({
    url: '/boss/records/' + consumptionId,
    method: 'get'
  })
}

// 新增用户详情-消费记录-新增
export function addRecords(data) {
  return request({
    url: '/boss/records',
    method: 'post',
    data: data
  })
}

// 修改用户详情-消费记录-新增
export function updateRecords(data) {
  return request({
    url: '/boss/records',
    method: 'put',
    data: data
  })
}

// 删除用户详情-消费记录-新增
export function delRecords(consumptionId) {
  return request({
    url: '/boss/records/' + consumptionId,
    method: 'delete'
  })
}
